Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer more recent version of libtinfo when selecting GHC build #3343

Merged
merged 1 commit into from
Aug 19, 2017

Conversation

rdnetto
Copy link
Contributor

@rdnetto rdnetto commented Aug 13, 2017

When both libtinfo 5 and 6 are installed on the same system, Stack currently defaults to 5. This breaks if nopie is also required, because the no-pie flags in stack-setup-2.yaml differ in case between linux64-nopie and linux64-tinfo6-nopie. In the long run it would probably make sense to simply infer the correct flags within Stack instead of hardcoding them in YAML, but that's a much more complex change.

Instead, this patch changes the order these flags are tested in, so that we default to the newer version if both are present.

I've tested it by running stack setup on the following distros (via Docker images):

  • Sabayon / Hardened Gentoo - correctly uses tinfo6-nopie now
  • Ubuntu Zesty - still uses standard
  • Ubuntu Xenial - uses standard
  • Fedora - uses tinfo6 before and after change
  • Arch (dock0/arch) - uses ncurses6

@borsboom
Copy link
Contributor

You're entirely right that Stack should infer these flags (really, the GHC bindist should do so when running ./configure). A PR to have it do so would be most welcome!

With this approach, I'm concerned that this could still break someone else's distro. Nevertheless, since you've tested it on lots of distros, I'll merge it. Thanks!

@borsboom borsboom merged commit 8b022c8 into commercialhaskell:master Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants